<template>
  <div>
      <h4>第五题</h4>
      <p :style="{backgroundColor:rgb}">刷新显示随机背景颜色</p>
  </div>
</template>

<script>
export default {
  data () {
    return {
      rgb: ''
    }
  },
  created () {
    const r = Math.floor(Math.random() * 256)
    const g = Math.floor(Math.random() * 256)
    const b = Math.floor(Math.random() * 256)
    this.rgb = `rgba(${r},${g},${b})`
  }
}
</script>

<style>

</style>
